package cn.shujuhai.common.controller.common;

import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
@RequestMapping("/error")
public class CustomErrorController implements ErrorController {

    @GetMapping("/500")
    public ModelAndView handleError() {
        return new ModelAndView("/page/common/error/404");
    }
}